home *** CD-ROM | disk | FTP | other *** search
- Path: nntp1.best.com!usenet
- From: javaprog@best.com (John Lockwood)
- Newsgroups: comp.lang.c++
- Subject: Re: NEED HELP WITH ABSOLUTE ADDRESSING
- Date: Fri, 19 Apr 1996 04:54:21 GMT
- Organization: Best Internet Communications
- Message-ID: <4l76ag$ocp@nntp1.best.com>
- References: <4l6gnp$38c@janus.cqu.edu.au>
- NNTP-Posting-Host: javaprog.vip.best.com
- X-Newsreader: Forte Free Agent 1.0.82
-
- Mutchg@Topaz.Cqu.Edu.Au (G.D.Mutch) wrote:
-
- >Can Anyone tell me how to assign an absolute address to a variable,
- >or get the variable to point to 0x378 ?
-
- >I wish to access the 24 bits at the parallel printer port directly.
- >and load the data directly.
-
- >I wish to get the compiler to assign 0x378 to the variable address.
- > Eg.
-
- Since C++ is typed, you need to cast:
-
- int* base = (int *) 0x378;
-
- Now that I've loaded the gun for you, I do hope you won't complain to
- me if you shoot yourself in the foot with it. :-)
-
-
- John
-
-
-
-
- Regards,
-
-
-
- John Lockwood
- john@wwg.com
- javaprog@best.com
- http://www.best.com/~javaprog
-
-